<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
JHTML::_('behavior.modal');
JPluginHelper::importPlugin('content');
$dispatcher	= JDispatcher::getInstance();

?>
<?php foreach($this->items as $i => $item): ?>
	<tr class="row<?php echo $i % 2; ?>">
    		<td>
			<?php echo JHtml::_('grid.id', $i, $item->id); ?>
		</td>
		<td>
			<a href="<?php echo JRoute::_('index.php?option=com_shop&view=order&layout=edit&id='.$item->id); ?>"><?php echo $item->title; ?></a>
		</td>
        <td class="center">
			<?php echo date('d-m-Y',$item->datestart); ?>
		</td>
         <td class="center">
         	<?php echo date('d-m-Y',$item->dateend); ?>
		</td>
          <td class="center">
					<?php echo JHtml::_('jgrid.published', $item->state, $i,'orderes.'); ?>
		</td>
         <td class="order">
 <span><?php echo $this->pagination->orderUpIcon($i, true, 'orderes.orderup', 'JLIB_HTML_MOVE_UP', true); ?></span>
 <span><?php echo $this->pagination->orderDownIcon($i, $this->pagination->total, true, 'orderes.orderdown', 'JLIB_HTML_MOVE_DOWN', true); ?></span>
       <input type="text" name="order[]" size="5" value="<?php echo $item->ordering;?>"  class="text-area-order" />
       </td>
        <td class="center">
        <?php echo $item->id; ?>
        </td>
	</tr>
<?php endforeach; ?>